
<!DOCTYPE html>
<html>
<head>[#include "../manage/common/head.html" /]
</head>

<body class="gray-bg">
	<div class="wrapper wrapper-content">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>订单详情</h5>
					</div>
					<div class="ibox-content">
						<div role="form" class="form-inline">
                            <div class="form-group col-sm-12">
                            	<label class="control-label pull-left">订单编码：</label>
								<div class="col-sm-8">
									<input type="text" class="form-control" id="orderNumber">
								</div>
                            </div>
                            <br>
                            <br>
                            <div class="input-search text-center">
	                            <div class="form-group has-feedback input-group">
	                       			<span class="input-group-btn">
							        	<button class="btn btn-primary" type="button" onclick="search();">查询</button>
							     	</span>
	                            </div>
                            </div>
                        </div>
                        <hr>
						<table
							class="table table-striped table-bordered table-hover dataTables">
							<thead>
								<tr>
									<th class="text-center">商品名称</th>
									<th class="text-center">购买数量</th>
									<th class="text-center">商品价格</th>
								</tr>
							</thead>
							<tbody>
							</tbody>
						</table>

					</div>
				</div>
			</div>
		</div>
	</div>
	[#include "../manage/common/js.html" /]
	<script>
		$(function() {
			dt = $('.dataTables').dataTable({
				"ordering" : false,
				"searching" : false,
				"info" : true,
				"bLengthChange" : false,
				"pagingType" : "full_numbers",
				"language" : {
					"lengthMenu" : "每页 _MENU_ 条记录",
					"zeroRecords" : "没有找到记录",
					"info" : "第 _PAGE_ 页 ( 总共 _PAGES_ 页 )",
					"infoEmpty" : "无记录",
					"infoFiltered" : "(从 _MAX_ 条记录过滤)",
					"sEmptyTable" : "表中数据为空",
					"sLoadingRecords" : "载入中...",
					"oPaginate" : {
						"sFirst" : "首页",
						"sPrevious" : "上一页",
						"sNext" : "下一页",
						"sLast" : "末页"
					}
				},
				"serverSide" : true,
				"sAjaxSource" : "${base}/manage/orderInfoItems/selectOrderInfoItemsListByOrderId",
				"columns" : [{
					"data" : "goodsName",
					"sWidth": "40%"
				},{
					"data" : "buyCount",
					"sWidth": "20%"
				},{
					"data" : "goodsPrice",
					"sWidth": "40%"
				}],
				"fnServerData" : function(sSource, aoData, fnCallback) {
					aoData.push({ "name": "orderNumber", "value": $("#orderNumber").val() });
					$.ajax({
						"dataType" : 'json',
						"type" : "POST",
						"url" : sSource,
						"data" : aoData,
						"success" : fnCallback
					});
				}
			});

		})

		function search() {
			dt.fnFilter();
		}
	</script>
</body>
</html>
